package com.wb.system.service.impl;

import com.wb.common.vo.LearningModelVO;
import com.wb.system.domain.LearningsEntity;
import com.wb.system.mapper.LearningMapper;
import com.wb.system.mapper.WwwInfoMapper;
import com.wb.system.service.LearningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LearningServiceImpl implements LearningService {

    @Autowired
    private LearningMapper learningMapper;

    @Override
    public List<LearningsEntity> progress(LearningModelVO learningModelVO) {
        return learningMapper.progress(learningModelVO);
    }

    @Override
    public String selectById(Long id) {
        return learningMapper.selectById(id);
    }

    @Override
    public void saveLearnings(LearningsEntity learnings) {
        learningMapper.saveLearnings(learnings);
    }

    @Override
    public void updateLearningsById(LearningsEntity learnings) {
        learningMapper.updateLearningsById(learnings);
    }

    @Override
    public void removeLearningsByIds(List<Long> ids) {
        if (ids != null && ids.size() > 0) {
            for (Long id : ids) {
                learningMapper.removeLearningsById(id);
            }
        }
    }
}
